package vip.george.bean.config;


import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import vip.george.bean.beanfactory.DogFactoryBean;

@Component
public class DogFactoryConfig {


    /**
     * 当返回值的类型是FactoryBean的子类时，会调用其重写来自父类FactoryBean的getObject方法创建bean对象,而不会创建工厂类本身作为bean
     * @return
     */
    @Bean
    public DogFactoryBean dogCreateByFactory() {
        return new DogFactoryBean();
    }
}
